/*
 * init.c
 *
 *  Created on: 28 Apr 2015
 *      Author: yiqi.pan
 */
#include "common.h"

void init(void)
{

  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB, ENABLE);
   
  /* Enable USART clock */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE);
  
  /* DMA1 clock enable */
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1 , ENABLE);
	
	/* Deinitialize DMA channels */
	//DMA_GlobalDeInit();
}

